/*
#include <math.h>
#include <algorithm>
#include <string>
#include <map>
#include <hash_map>
#include <set>
#include <vector>
#include <iostream>
#include <sstream>
using namespace std;
void swap(int &a,int &b){
	a=a^b;
	b=a^b;
	a=a^b;
}
vector<int> plusOne(vector<int>& digits) {
	vector<int>result;
	int more=0,tmp;
	for(int i=digits.size()-1;i>=0;i--){
		if(i==digits.size()-1){
			result.push_back((1+digits[i]+more)%10);
			more=(1+digits[i]+more)/10;
		}
		else{
			result.push_back((digits[i]+more)%10);
			more=(digits[i]+more)/10;
		}
	}
	if(more>0){
		result.push_back(more);
	}
	for(int i=0;i<result.size()/2;i++)
		swap(result[i],result[result.size()-1-i]);
	return result;
}

int main(){
	string p;
	//8,2,4,4,4,9,5,2,5,8,8,0,8,6,9,1,1,6,3,5,1,2,6,6,0,4,8,6,0,3,2,8,7,6,5,1,7,0,3,4,8,3,5,9,0,4,0,1,0,5,9,2,0,7,0,2,1,0,8,2,5,1,2,3,9,7,4,7,0,0,1,8,5,6,7,5,1,9,9,3,5,0,7,5
	int a[]={9,9,9,9};
	vector<int>v1(a,a+sizeof(a)/sizeof(int));
	cout<<plusOne(v1).size();
	cout<<endl;
	system("pause");
	return 0;
}
*/